import { defineStore } from "pinia";

export const useCounter = defineStore("count", {
  state: () => {
    return {
      num: 100,
    };
  },
  getters: {
    double(): number {
      return this.num * 2;
    },
  },
  persist: {
    key: "pinia-count-num", //指定持久化存储的名称
  },
});
